Fix a race condition for multi-thread qemu dma, where vmx linux guests
authorkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Tue, 29 Nov 2005 10:38:53 +0000 (11:38 +0100)
committerkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Tue, 29 Nov 2005 10:38:53 +0000 (11:38 +0100)
commite9b54a136b4a75a5fa58a78121e6182463454abb
tree21000566202c75a4d8dc33576484511f53ed8913
parent0cf194e2b0bd456191dadd51fe7a0ab880183330
Fix a race condition for multi-thread qemu dma, where vmx linux guests
show warning "dma interrupt lost" and dma becomes very slow.

root cause: In the time between set ide irq and set dma status, if guest
receive the irq and query the status, it will find the status is not
ready and therefore treat it as pseudo interrupt. Change the order of
set irq and set dma status fixes this issue.

Signed-off-by: Ke Yu <ke.yu@intel.com>
tools/ioemu/hw/ide.c